<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP, RankNTypes, FlexibleContexts #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-comment">-- Compatibility layer for GHC.ResponseFile</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- Implementation from base 4.12.0 is used.</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- http://hackage.haskell.org/package/base-4.12.0.0/src/LICENSE</span><span>
</span><span id="line-6"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Compat.ResponseFile</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Compat.ResponseFile.html#expandResponse"><span class="hs-identifier">expandResponse</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-9"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-10"></span><span>
</span><span id="line-11"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/System.IO.html#"><span class="hs-identifier">System.IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IO.Handle.Text.html#hPutStrLn"><span class="hs-identifier">hPutStrLn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.StdHandles.html#stderr"><span class="hs-identifier">stderr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/System.IO.Error.html#"><span class="hs-identifier">System.IO.Error</span></a></span><span class="hs-cpp">

#if MIN_VERSION_base(4,12,0)
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.ResponseFile.html#"><span class="hs-identifier">GHC.ResponseFile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.ResponseFile.html#unescapeArgs"><span class="hs-identifier">unescapeArgs</span></a></span><span class="hs-special">)</span><span class="hs-cpp">
#else
</span><span>
</span><span id="line-19"></span><span class="hs-identifier">unescapeArgs</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-identifier">String</span><span class="hs-special">]</span><span>
</span><span id="line-20"></span><span class="hs-identifier">unescapeArgs</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">filter</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">not</span><span> </span><span class="hs-operator">.</span><span> </span><span class="hs-identifier">null</span><span class="hs-special">)</span><span> </span><span class="hs-operator">.</span><span> </span><span class="hs-identifier">unescape</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span class="hs-keyword">data</span><span> </span><span class="hs-identifier">Quoting</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">NoneQ</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">SngQ</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">DblQ</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-identifier">unescape</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">String</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-identifier">String</span><span class="hs-special">]</span><span>
</span><span id="line-25"></span><span class="hs-identifier">unescape</span><span> </span><span class="hs-identifier">args</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">reverse</span><span> </span><span class="hs-operator">.</span><span> </span><span class="hs-identifier">map</span><span> </span><span class="hs-identifier">reverse</span><span> </span><span class="hs-operator">$</span><span> </span><span class="hs-identifier">go</span><span> </span><span class="hs-identifier">args</span><span> </span><span class="hs-identifier">NoneQ</span><span> </span><span class="hs-identifier">False</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-26"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-27"></span><span>      </span><span class="hs-comment">-- n.b., the order of these cases matters; these are cribbed from gcc</span><span>
</span><span id="line-28"></span><span>      </span><span class="hs-comment">-- case 1: end of input</span><span>
</span><span id="line-29"></span><span>      </span><span class="hs-identifier">go</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-identifier">_q</span><span>    </span><span class="hs-identifier">_bs</span><span>   </span><span class="hs-identifier">a</span><span> </span><span class="hs-keyword">as</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">a</span><span class="hs-glyph">:</span><span class="hs-keyword">as</span><span>
</span><span id="line-30"></span><span>      </span><span class="hs-comment">-- case 2: back-slash escape in progress</span><span>
</span><span id="line-31"></span><span>      </span><span class="hs-identifier">go</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">c</span><span class="hs-glyph">:</span><span class="hs-identifier">cs</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">q</span><span>     </span><span class="hs-identifier">True</span><span>  </span><span class="hs-identifier">a</span><span> </span><span class="hs-keyword">as</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">go</span><span> </span><span class="hs-identifier">cs</span><span> </span><span class="hs-identifier">q</span><span>     </span><span class="hs-identifier">False</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">c</span><span class="hs-glyph">:</span><span class="hs-identifier">a</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">as</span><span>
</span><span id="line-32"></span><span>      </span><span class="hs-comment">-- case 3: no back-slash escape in progress, but got a back-slash</span><span>
</span><span id="line-33"></span><span>      </span><span class="hs-identifier">go</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">c</span><span class="hs-glyph">:</span><span class="hs-identifier">cs</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">q</span><span>     </span><span class="hs-identifier">False</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-keyword">as</span><span>
</span><span id="line-34"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="hs-char">'\\'</span><span> </span><span class="hs-operator">==</span><span> </span><span class="hs-identifier">c</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">go</span><span> </span><span class="hs-identifier">cs</span><span> </span><span class="hs-identifier">q</span><span>     </span><span class="hs-identifier">True</span><span>  </span><span class="hs-identifier">a</span><span>     </span><span class="hs-keyword">as</span><span>
</span><span id="line-35"></span><span>      </span><span class="hs-comment">-- case 4: single-quote escaping in progress</span><span>
</span><span id="line-36"></span><span>      </span><span class="hs-identifier">go</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">c</span><span class="hs-glyph">:</span><span class="hs-identifier">cs</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">SngQ</span><span>  </span><span class="hs-identifier">False</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-keyword">as</span><span>
</span><span id="line-37"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="hs-char">'\''</span><span> </span><span class="hs-operator">==</span><span> </span><span class="hs-identifier">c</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">go</span><span> </span><span class="hs-identifier">cs</span><span> </span><span class="hs-identifier">NoneQ</span><span> </span><span class="hs-identifier">False</span><span> </span><span class="hs-identifier">a</span><span>     </span><span class="hs-keyword">as</span><span>
</span><span id="line-38"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">otherwise</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">go</span><span> </span><span class="hs-identifier">cs</span><span> </span><span class="hs-identifier">SngQ</span><span>  </span><span class="hs-identifier">False</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">c</span><span class="hs-glyph">:</span><span class="hs-identifier">a</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">as</span><span>
</span><span id="line-39"></span><span>      </span><span class="hs-comment">-- case 5: double-quote escaping in progress</span><span>
</span><span id="line-40"></span><span>      </span><span class="hs-identifier">go</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">c</span><span class="hs-glyph">:</span><span class="hs-identifier">cs</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">DblQ</span><span>  </span><span class="hs-identifier">False</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-keyword">as</span><span>
</span><span id="line-41"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="hs-char">'&quot;'</span><span> </span><span class="hs-operator">==</span><span> </span><span class="hs-identifier">c</span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">go</span><span> </span><span class="hs-identifier">cs</span><span> </span><span class="hs-identifier">NoneQ</span><span> </span><span class="hs-identifier">False</span><span> </span><span class="hs-identifier">a</span><span>     </span><span class="hs-keyword">as</span><span>
</span><span id="line-42"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">otherwise</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">go</span><span> </span><span class="hs-identifier">cs</span><span> </span><span class="hs-identifier">DblQ</span><span>  </span><span class="hs-identifier">False</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">c</span><span class="hs-glyph">:</span><span class="hs-identifier">a</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">as</span><span>
</span><span id="line-43"></span><span>      </span><span class="hs-comment">-- case 6: no escaping is in progress</span><span>
</span><span id="line-44"></span><span>      </span><span class="hs-identifier">go</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">c</span><span class="hs-glyph">:</span><span class="hs-identifier">cs</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">NoneQ</span><span> </span><span class="hs-identifier">False</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-keyword">as</span><span>
</span><span id="line-45"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">isSpace</span><span> </span><span class="hs-identifier">c</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">go</span><span> </span><span class="hs-identifier">cs</span><span> </span><span class="hs-identifier">NoneQ</span><span> </span><span class="hs-identifier">False</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>    </span><span class="hs-special">(</span><span class="hs-identifier">a</span><span class="hs-glyph">:</span><span class="hs-keyword">as</span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="hs-char">'\''</span><span> </span><span class="hs-operator">==</span><span> </span><span class="hs-identifier">c</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">go</span><span> </span><span class="hs-identifier">cs</span><span> </span><span class="hs-identifier">SngQ</span><span>  </span><span class="hs-identifier">False</span><span> </span><span class="hs-identifier">a</span><span>     </span><span class="hs-keyword">as</span><span>
</span><span id="line-47"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="hs-char">'&quot;'</span><span>  </span><span class="hs-operator">==</span><span> </span><span class="hs-identifier">c</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">go</span><span> </span><span class="hs-identifier">cs</span><span> </span><span class="hs-identifier">DblQ</span><span>  </span><span class="hs-identifier">False</span><span> </span><span class="hs-identifier">a</span><span>     </span><span class="hs-keyword">as</span><span>
</span><span id="line-48"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">otherwise</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">go</span><span> </span><span class="hs-identifier">cs</span><span> </span><span class="hs-identifier">NoneQ</span><span> </span><span class="hs-identifier">False</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">c</span><span class="hs-glyph">:</span><span class="hs-identifier">a</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">as</span><span class="hs-cpp">

#endif
</span><span>
</span><span id="line-52"></span><span class="annot"><a href="Distribution.Compat.ResponseFile.html#expandResponse"><span class="hs-identifier hs-type">expandResponse</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-53"></span><span id="expandResponse"><span class="annot"><span class="annottext">expandResponse :: [String] -&gt; IO [String]
</span><a href="Distribution.Compat.ResponseFile.html#expandResponse"><span class="hs-identifier hs-var hs-var">expandResponse</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; [String] -&gt; IO [String]
</span><a href="#local-6989586621679623565"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679623564"><span class="hs-identifier hs-var">recursionLimit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.&quot;</span></span><span>
</span><span id="line-54"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-55"></span><span>    </span><span id="local-6989586621679623564"><span class="annot"><span class="annottext">recursionLimit :: Int
</span><a href="#local-6989586621679623564"><span class="hs-identifier hs-var hs-var">recursionLimit</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">100</span></span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span>    </span><span class="annot"><a href="#local-6989586621679623565"><span class="hs-identifier hs-type">go</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-58"></span><span>    </span><span id="local-6989586621679623565"><span class="annot"><span class="annottext">go :: Int -&gt; String -&gt; [String] -&gt; IO [String]
</span><a href="#local-6989586621679623565"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679623561"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679623561"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679623560"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679623560"><span class="hs-identifier hs-var">dir</span></a></span></span><span>
</span><span id="line-59"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679623561"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([[String]] -&gt; [String]) -&gt; IO [[String]] -&gt; IO [String]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">[[String]] -&gt; [String]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="annot"><span class="annottext">(IO [[String]] -&gt; IO [String])
-&gt; ([String] -&gt; IO [[String]]) -&gt; [String] -&gt; IO [String]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO [String]) -&gt; [String] -&gt; IO [[String]]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; String -&gt; String -&gt; IO [String]
</span><a href="#local-6989586621679623556"><span class="hs-identifier hs-var">expand</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679623561"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679623560"><span class="hs-identifier hs-var">dir</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-60"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO [String] -&gt; [String] -&gt; IO [String]
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">(IO [String] -&gt; [String] -&gt; IO [String])
-&gt; IO [String] -&gt; [String] -&gt; IO [String]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Handle -&gt; String -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.Text.html#hPutStrLn"><span class="hs-identifier hs-var">hPutStrLn</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="../../base/src/GHC.IO.StdHandles.html#stderr"><span class="hs-identifier hs-var">stderr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Error: response file recursion limit exceeded.&quot;</span></span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO [String] -&gt; IO [String]
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">IO [String]
forall a. IO a
</span><a href="../../base/src/System.Exit.html#exitFailure"><span class="hs-identifier hs-var">exitFailure</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span>    </span><span class="annot"><a href="#local-6989586621679623556"><span class="hs-identifier hs-type">expand</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-63"></span><span>    </span><span id="local-6989586621679623556"><span class="annot"><span class="annottext">expand :: Int -&gt; String -&gt; String -&gt; IO [String]
</span><a href="#local-6989586621679623556"><span class="hs-identifier hs-var hs-var">expand</span></a></span></span><span> </span><span id="local-6989586621679623553"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679623553"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679623552"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679623552"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span id="local-6989586621679623551"><span class="annot"><span class="annottext">arg :: String
</span><a href="#local-6989586621679623551"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'@'</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679623550"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679623550"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; IO [String]
</span><a href="#local-6989586621679623549"><span class="hs-identifier hs-var">readRecursively</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679623553"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679623552"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679623550"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IO [String] -&gt; (IOError -&gt; IO [String]) -&gt; IO [String]
forall a. IO a -&gt; (IOError -&gt; IO a) -&gt; IO a
</span><a href="../../base/src/System.IO.Error.html#catchIOError"><span class="hs-operator hs-var">`catchIOError`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IO [String] -&gt; IOError -&gt; IO [String]
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">(IO [String] -&gt; IOError -&gt; IO [String])
-&gt; IO [String] -&gt; IOError -&gt; IO [String]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
forall a. Show a =&gt; a -&gt; IO ()
</span><a href="../../base/src/System.IO.html#print"><span class="hs-identifier hs-var">print</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;?&quot;</span></span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO [String] -&gt; IO [String]
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; IO [String]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679623551"><span class="hs-identifier hs-var">arg</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span>    </span><span class="annot"><a href="#local-6989586621679623556"><span class="hs-identifier hs-var">expand</span></a></span><span> </span><span id="local-6989586621679623546"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679623546"><span class="hs-identifier hs-var">_n</span></a></span></span><span> </span><span id="local-6989586621679623545"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679623545"><span class="hs-identifier hs-var">_dir</span></a></span></span><span> </span><span id="local-6989586621679623544"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679623544"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; IO [String]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679623544"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span>    </span><span class="annot"><a href="#local-6989586621679623549"><span class="hs-identifier hs-type">readRecursively</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-67"></span><span>    </span><span id="local-6989586621679623549"><span class="annot"><span class="annottext">readRecursively :: Int -&gt; String -&gt; IO [String]
</span><a href="#local-6989586621679623549"><span class="hs-identifier hs-var hs-var">readRecursively</span></a></span></span><span> </span><span id="local-6989586621679623543"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679623543"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679623542"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679623542"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; [String] -&gt; IO [String]
</span><a href="#local-6989586621679623565"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679623543"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeDirectory"><span class="hs-identifier hs-var">takeDirectory</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679623542"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([String] -&gt; IO [String]) -&gt; IO [String] -&gt; IO [String]
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="../../base/src/GHC.ResponseFile.html#unescapeArgs"><span class="hs-identifier hs-var">unescapeArgs</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; [String]) -&gt; IO String -&gt; IO [String]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
</span><a href="../../base/src/System.IO.html#readFile"><span class="hs-identifier hs-var">readFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679623542"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-68"></span></pre></body></html>